<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Student(uname,id,sex,grade) {
            this.name = uname,
            this.id = id,
            this.sex = sex,
            this.grade = grade,
            this.sayHi = function(sayHi) {
                 alert(`你好我是${this.name}`);
            }
        }
        var stu1 = new Student ('阿萨',12212,'男',6)
        console.log(stu1);
        stu1.sayHi()

        
    </script>
</body>
</html>